import java.util.Scanner;
public class Quadrants
{
   public static void main (String[] args)
   {
      // Display prompt for degrees of angle
      System.out.println("Please enter the number of degrees of angle: ");

      // Read angle in degrees
      Scanner in = new Scanner(System.in);
      int angle = in.nextInt();

      String quadrant;

      // Determine and print out the quadrant for the angle as "I", "II", "III", or
      // "IV", or print the word "Error"
      if(angle>=0 && angle< 90) quadrant="I";
      else if(angle>=90 && angle< 180) quadrant="II";
      else if(angle>=180 && angle< 270) quadrant="III";
      else if(angle>=270 && angle<= 359) quadrant="IV";
      else quadrant="Error";
      


      System.out.println(quadrant);
   }
}